package com.design.prototypepattern.general;

/**
 * @auther LiZiBa
 * @date 2020/8/8 23:30
 * @description:
 **/
public class ConcreatePrototype implements IPrototype{

    private String name;
    private String size;

    public ConcreatePrototype() {

    }

    public ConcreatePrototype(String name, String size) {
        this.name = name;
        this.size = size;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    @Override
    public Object colne() {

        ConcreatePrototype concreatePrototype = new ConcreatePrototype();
        concreatePrototype.setName(this.name);
        concreatePrototype.setSize(this.size);
        return concreatePrototype;
    }

    @Override
    public String toString() {
        return "ConcreatePrototype{" +
                "name='" + name + '\'' +
                ", size='" + size + '\'' +
                '}';
    }
}
